<template>
<!--  测试-->
  <div>
    <el-button
      style="position: absolute;left: 95%;z-index: 999"
      type="primary"
      plain
      icon="el-icon-plus"
      size="mini"
      @click="handleAdd"
      v-hasPermi="['work:award:add']"
    >新增</el-button>
    <el-row>
      <el-col :span="4">
        <div>
          <el-menu
            default-active="1"
            class="el-menu-vertical-demo"
            background-color="#ffffff"
            text-color="#000000"
            active-text-color="#409EFF"
            unique-opened
          >

              <template slot="title">所有成果</template>
              <el-menu-item-group title="成果类型">
                <el-menu-item v-for="dict in dict.type.work_type" :index="dict.value" @click="handleSelect(dict.value)">{{dict.label}}</el-menu-item>

              </el-menu-item-group>
              <el-menu-item-group title="年度分布">

              </el-menu-item-group>
              <el-menu-item-group title="参与形式">
                <el-menu-item index="1-13">主持</el-menu-item>
                <el-menu-item index="1-14">参与</el-menu-item>
              </el-menu-item-group>

          </el-menu>
        </div>
      </el-col>
      <el-col :span="20">
        <div>
          <div v-if="chouseItemId==1">
            <award ></award>
          </div>
          <div v-if="chouseItemId==2">
            <paper></paper>
          </div>
          <div v-if="chouseItemId==3">
            <patent></patent>
          </div>
          <div v-if="chouseItemId==4">
          </div>
        </div>
      </el-col>
    </el-row>

    <el-dialog title="添加获奖" :visible.sync="open" width="1200px" append-to-body>
      <AddAward></AddAward>

    </el-dialog>
  </div>
</template>

<script>
import Award from "@/views/work/award/index.vue";
import Paper from  "@/views/work/paper/index.vue";
import Patent from "@/views/work/patent/index.vue";

export default {
  name:"work",
  components: {Patent, Award,Paper},
  dicts:['work_type'],
  data(){
   return{
     chouseItemId:1,
     open:false
   }

  },
  created() {

  },
  methods: {

    handleSelect(key) {
      this.chouseItemId = key;
    }
  }
}

</script>

<style scoped lang="scss">
.el-menu-vertical-demo {
  width: 100%;
  border-right: 1px solid #ebeef5;
}
.el-submenu__title::after {
  display: none !important; /* 禁用下拉箭头 */
}
</style>
